<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>InsertXMLMap</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">InsertXMLMap()</font></b></p>
<p><b>Syntax</b></p><blockquote>

Result = <font color="#006666"><b>InsertXMLMap</b></font>(ParentNode, Map() [, PreviousNode])</blockquote>

</blockquote>
<b>Description</b><br><blockquote>



Insert the specified Map() as a new XML node into the given parent node. 

 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>ParentNode</i></td>
<td width="90%"> 
 
The node into which to insert the new node. To insert the new node 
at the root of the tree, <a href="rootxmlnode.html">RootXMLNode()</a> can be used here. 

 

</td></tr>
<tr><td><i>Map()</i></td>
<td> 
 
The map to insert into the XML. 

 

</td></tr>
<tr><td><i>PreviousNode (optional)</i></td>
<td> 
 
A childnode of 'ParentNode' after which the new node should 
be inserted. If this value is 0 or not specified, the new node is inserted as the first child of 
its parent. If this value is -1, the node is inserted as the last child of its parent. 

 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>



The new XML node if it was created successfully or zero if no node could 
be inserted at this point. 

 

</blockquote><p><b>Remarks</b></p><blockquote>



The rules specified in the <a href="createxmlnode.html">CreateXMLNode()</a> for where a new node can be inserted 
also apply to this function. 
<br>
<br>
The inserted node is named "map" and the contained element nodes are named "element". 
Each element node will have an attribute named "key" containing the map key of the 
element. See below for an example of the created XML. 

 

</blockquote><p><b>Example</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <font color="#006666">; This example produces the following XML tree:</font>
  <font color="#006666">;</font>
  <font color="#006666">; &lt;map&gt;</font>
  <font color="#006666">;   &lt;element key="DE"&gt;Germany&lt;/element&gt;</font>
  <font color="#006666">;   &lt;element key="US"&gt;United States&lt;/element&gt;</font>
  <font color="#006666">;   &lt;element key="FR"&gt;France&lt;/element&gt;</font>
  <font color="#006666">; &lt;/map&gt;</font>
  <font color="#006666">;</font>
  <b><font color="#006666">NewMap</font></b> <font color="#006666">Countries</font>.s()
<font color="#006666">  Countries</font>("DE") = "Germany"
<font color="#006666">  Countries</font>("FR") = "France"  
<font color="#006666">  Countries</font>("US") = "United States"

  <b><font color="#006666">If</font></b> <font color="#006666">CreateXML</font>(0)
<font color="#006666">    InsertXMLMap</font>(<font color="#006666">RootXMLNode</font>(0),<font color="#006666"> Countries</font>())
<font color="#006666">    FormatXML</font>(0, <font color="#924B72">#PB_XML_ReFormat</font>)
    <b><font color="#006666">Debug</font></b> <font color="#006666">ComposeXML</font>(0)
  <b><font color="#006666">EndIf</font></b>
</font></pre>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="extractxmlmap.html">ExtractXMLMap()</a>, <a href="insertxmlarray.html">InsertXMLArray()</a>, <a href="insertxmllist.html">InsertXMLList()</a>, <a href="insertxmlstructure.html">InsertXMLStructure()</a> 

</Blockquote><p><b>Supported OS  </b><Blockquote>All</Blockquote></p><center>&lt;- <a href=insertxmllist.html>InsertXMLList()</a> - <a href=index.html>XML Index</a> - <a href=insertxmlstructure.html>InsertXMLStructure()</a> -&gt;



</body></html>